
#if	!defined( __20081116_DEF_CONNECTION_H__ )
#define	__20081116_DEF_CONNECTION_H__

namespace PCE_Lib {
namespace CEnv_Def {
namespace PCE_Lib_CurrentCEnvironment {
namespace Tools {

class Connection
{
public:
	virtual bool IsOpen( void ) throw() = 0;
	virtual bool IsFail( void ) throw() = 0;
protected:
	Connection( void ) throw() {}
public:
	virtual ~Connection( void ) throw() {}
};

class SyncConnection : public Connection
{
public:
	typedef	Connection	inherited;
public:
	virtual bool Send( const void * buff, usize_t len ) throw() = 0;
	virtual usize_t Receive( void * buff, usize_t len ) throw() = 0;
protected:
	SyncConnection( void ) throw() : inherited() {}
public:
	virtual ~SyncConnection( void ) throw() {}
};

class AsyncConnection : public Connection
{
public:
	typedef	Connection	inherited;
protected:
	AsyncConnection( void ) throw() : inherited() {}
public:
	virtual ~AsyncConnection( void ) throw() {}
};

}	// Tools
}	// PCE_Lib_CurrentCEnvironment
}	// CEnv_Def
}	// PCE_Lib

#endif	// __20081116_DEF_CONNECTION_H__
